<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/animate.js"></script>
    <style>
        .box{
            position: absolute;
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>

    <button>点击运动</button>
<p></p>
    <div class="box"></div>
    <script>
        let btn=document.querySelector('button');
        let box=document.querySelector('.box');
        btn.addEventListener('click',function(){
            animate(box,500,function(){alert(1)});
        });
     
    </script>
</body>
</html>